//
//  MCCollectionView.swift
//  WisdomSpace
//
//  Created by MC on 2018/10/9.
//  Copyright © 2018年 MC. All rights reserved.
//

import UIKit

class MCCollectionView: UICollectionView {


    override init(frame: CGRect, collectionViewLayout layout: UICollectionViewLayout) {
        super.init(frame: frame, collectionViewLayout: layout)
      
        self.backgroundColor = UIColor.white
        self.bgImageView.frame = frame
        self.backgroundView = self.bgImageView

    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    public func showBgImage() {
        self.bgImageView.isHidden = false
    }
    
    public func hideBgImage() {
        self.bgImageView.isHidden = true
    }
    
    
    public lazy var bgImageView: UIImageView = {
        let bgImageView = UIImageView.init()
        bgImageView.image = UIImage.init(named: "Reuse_emptyData")
        bgImageView.contentMode = UIViewContentMode.center
        bgImageView.isHidden = true
        return bgImageView
    }()
}
